/*

Author   : chaos

FileName : inh_static_men.cpp

Date     : 14/08/17 10:58:03

*/
#include <iostream>
#include <cstring>

using namespace std;

class library_object
{
    protected:
        char name[30];
        long index;
        static char File_Name[20];
    public:
        library_object(const char * i_name)
        {
            strcpy(name,i_name);
            index = 1;
        }

        void show_data()
        {
            cout << "name :" << name;
            cout << " index : " << index;
            cout << "File_Name : " << File_Name << endl;
        }
};

char library_object::File_Name[20];

class Book:public library_object
{
    private:
        bool on_shelf;
    public:
        Book(const char * name):library_object(name)
    {
        on_shelf = true;
        strcpy(File_Name,"book.txt");
    }
};

class Reader:public library_object
{
    public:
        Reader(const char * name):library_object(name)
    {
        strcpy(File_Name,"reader.txt");
    }
};


int main(int argc ,char *argv[])
{
    Reader A_Reader("John");

    A_Reader.show_data();

    Book A_Book("The C++ Bible");

    A_Reader.show_data();

    return 0;
}
